package com.github.lzyzsd.library;

import android.content.Context;

public class DefaultHandler implements BridgeHandler{
	private Context context;
	OnScriptCallBack onScriptCallBack;

	public OnScriptCallBack getOnScriptCallBack() {
		return onScriptCallBack;
	}

	public void setOnScriptCallBack(OnScriptCallBack onScriptCallBack) {
		this.onScriptCallBack = onScriptCallBack;
	}

	String TAG = "DefaultHandler";


	public DefaultHandler(Context context){
		this.context = context;
	}
	@Override
	public void handler(String data, CallBackFunction function) {
		if(function != null){
			function.onCallBack("DefaultHandler response data");
		}
		if (onScriptCallBack != null){
			onScriptCallBack.onScriptCallBack(data);
		}

		//Toast.makeText(context, data, Toast.LENGTH_SHORT).show();
	}


	public interface OnScriptCallBack{
		void onScriptCallBack(String callback);
	}


}
